package com.example.test.dialogfactory;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.DigitsKeyListener;
import android.widget.EditText;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity101 extends AppCompatActivity {

    private EditText edit;

    public static void start( Context context ) {

        Intent starter = new Intent( context, MainActivity101.class );
        context.startActivity( starter );
    }

    @Override
    protected void onCreate( Bundle savedInstanceState ) {

        super.onCreate( savedInstanceState );
        setContentView( R.layout.activity_main101 );
        initView();
    }

    private void initView() {

        edit = (EditText) findViewById( R.id.edit );
        edit.setKeyListener( DigitsKeyListener.getInstance( "0123456789Xx" ) );
    }
}